import arcpy

try:
    arcpy.env.workspace = "c:/ArcpyBook/data/"
    fields = arcpy.ListFields("Building_Permits.shp")
    for fld in fields:
        print fld.name
except:
    print arcpy.GetMessages()

